package com.sale.system.mapper;

import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
import com.sale.common.mybatis.core.mapper.BaseMapperPlus;
import com.sale.system.domain.SysRoleMenu;

import java.util.List;

/**
 * 角色与菜单关联表 数据层
 *
 * @author Lion Li
 */
public interface SysRoleMenuMapper extends BaseMapperPlus<SysRoleMenuMapper, SysRoleMenu, SysRoleMenu> {

    /**
     * 根据角色id删除菜单数据
     */
    int deleteSysRoleMenus(Long roleId);

    /**
     * 查询角色id对应的菜单
     * @return
     */
    @InterceptorIgnore(tenantLine = "true")
    List<SysRoleMenu> selectById();

    /**
     * 查询角色id对应的菜单
     * @return
     */
    Long[] selectMenuIdByRoleId(Long roleId);
}
